package com.example.springboot.utils;

import org.springframework.stereotype.Component;

/**
 * @Author: jyf2000jyf
 * @Date: 2022/5/24
 * @Time: 23:17
 * @Email: 904593011@qq.com
 * @Description:
 **/
public class YardUtils {
    public static Integer judgeYard(String containerType, String destination) {
        Integer yard = 0;
        if ("普通箱".equals(containerType)) {

        } else if ("空箱".equals(containerType)) {
            yard += 3;
        } else if ("重箱".equals(containerType)) {
            yard += 6;
        } else if ("冷冻箱".equals(containerType)) {
            yard += 9;
        } else if ("危险箱".equals(containerType)) {
            yard += 12;
        } else if ("超重箱".equals(containerType)) {
            yard += 15;
        } else {
            return 0;
        }
        if ("亚洲".equals(destination)) {
            yard += 1;
        } else if ("美洲".equals(destination)) {
            yard += 2;
        } else if ("欧洲".equals(destination)) {
            yard += 3;
        } else {
            return 0;
        }
        return yard;
    }
}